using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSEvent
{
    /// <summary>
    /// <para>Create LRS Event From Existing Dataset</para>
    /// <para>Registers an existing feature class as an LRS event.</para>
    /// <para>将现有要素类注册为 LRS 事件。</para>
    /// </summary>    
    [DisplayName("Create LRS Event From Existing Dataset")]
    public class CreateLRSEventFromExistingDataset : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateLRSEventFromExistingDataset()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_parent_network">
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the event will be registered.</para>
        /// <para>事件将注册到的网络。</para>
        /// </param>
        /// <param name="_in_feature_class">
        /// <para>Event Feature Class</para>
        /// <para>The event to be registered.</para>
        /// <para>要注册的事件。</para>
        /// </param>
        /// <param name="_event_id_field">
        /// <para>Event ID Field</para>
        /// <para>The event ID field in the event feature class.</para>
        /// <para>事件要素类中的事件 ID 字段。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>The route ID field if the feature class is a point event that doesn't spans routes or the from route ID field if the feature class is a line event that spans routes.</para>
        /// <para>如果要素类是不跨越路径的点事件，则为路径 ID 字段，如果要素类是跨越路径的线事件，则为从路径 ID 字段。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>The from date field in the event feature class.</para>
        /// <para>事件要素类中的起始日期字段。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>The to date field in the event feature class.</para>
        /// <para>事件要素类中的至日期字段。</para>
        /// </param>
        /// <param name="_loc_error_field">
        /// <para>Loc Error Field</para>
        /// <para>The location error field in the event feature class.</para>
        /// <para>事件要素类中的位置错误字段。</para>
        /// </param>
        /// <param name="_measure_field">
        /// <para>Measure Field</para>
        /// <para>The measure field if the feature class is a point event or the from measure field if the feature class is a line event.</para>
        /// <para>如果要素类是点事件，则为测量字段，如果要素类是线事件，则为从测量字段。</para>
        /// </param>
        public CreateLRSEventFromExistingDataset(object _parent_network, object _in_feature_class, object _event_id_field, object _route_id_field, object _from_date_field, object _to_date_field, object _loc_error_field, object _measure_field)
        {
            this._parent_network = _parent_network;
            this._in_feature_class = _in_feature_class;
            this._event_id_field = _event_id_field;
            this._route_id_field = _route_id_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
            this._loc_error_field = _loc_error_field;
            this._measure_field = _measure_field;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Create LRS Event From Existing Dataset";

        public override string CallName => "locref.CreateLRSEventFromExistingDataset";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_parent_network, _in_feature_class, _event_id_field, _route_id_field, _from_date_field, _to_date_field, _loc_error_field, _measure_field, _to_measure_field, _event_spans_routes.GetGPValue(), _to_route_id_field, _store_route_name.GetGPValue(), _route_name_field, _to_route_name_field, _out_feature_class];

        /// <summary>
        /// <para>Parent LRS Network</para>
        /// <para>The network to which the event will be registered.</para>
        /// <para>事件将注册到的网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Parent LRS Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _parent_network { get; set; }


        /// <summary>
        /// <para>Event Feature Class</para>
        /// <para>The event to be registered.</para>
        /// <para>要注册的事件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Event ID Field</para>
        /// <para>The event ID field in the event feature class.</para>
        /// <para>事件要素类中的事件 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _event_id_field { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>The route ID field if the feature class is a point event that doesn't spans routes or the from route ID field if the feature class is a line event that spans routes.</para>
        /// <para>如果要素类是不跨越路径的点事件，则为路径 ID 字段，如果要素类是跨越路径的线事件，则为从路径 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>The from date field in the event feature class.</para>
        /// <para>事件要素类中的起始日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>The to date field in the event feature class.</para>
        /// <para>事件要素类中的至日期字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Loc Error Field</para>
        /// <para>The location error field in the event feature class.</para>
        /// <para>事件要素类中的位置错误字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Loc Error Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _loc_error_field { get; set; }


        /// <summary>
        /// <para>Measure Field</para>
        /// <para>The measure field if the feature class is a point event or the from measure field if the feature class is a line event.</para>
        /// <para>如果要素类是点事件，则为测量字段，如果要素类是线事件，则为从测量字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _measure_field { get; set; }


        /// <summary>
        /// <para>To Measure Field</para>
        /// <para>The to measure field in the event feature class. This parameter is required for line events.</para>
        /// <para>事件要素类中的待测量字段。此参数对于线路事件是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Measure Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_measure_field { get; set; } = null;


        /// <summary>
        /// <para>Event Spans Routes</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the event records will span routes.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The event records will span routes.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The event records will not span routes. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定事件记录是否跨越路由。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 事件记录将跨越路径。</bullet_item><para/>
        ///     <bullet_item>未选中 - 事件记录不会跨越路径。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Spans Routes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _event_spans_routes_value _event_spans_routes { get; set; } = _event_spans_routes_value._false;

        public enum _event_spans_routes_value
        {
            /// <summary>
            /// <para>NO_SPANS_ROUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SPANS_ROUTES")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>SPANS_ROUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SPANS_ROUTES")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>To Route ID Field</para>
        /// <para>The to route ID field for events that span routes. This parameter is required if the event feature class geometry type is polyline.</para>
        /// <para>跨路由的事件的 to route ID 字段。如果事件要素类几何类型为折线，则此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_route_id_field { get; set; } = null;


        /// <summary>
        /// <para>Store Route Name</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the route name will be stored with the event records.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The route name will be stored with the event records.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The route name will not be stored with the event records. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将路由名称与事件记录一起存储。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 路径名称将与事件记录一起存储。</bullet_item><para/>
        ///     <bullet_item>未选中 - 路径名称不会与事件记录一起存储。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store Route Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _store_route_name_value _store_route_name { get; set; } = _store_route_name_value._false;

        public enum _store_route_name_value
        {
            /// <summary>
            /// <para>NO_STORE_ROUTE_NAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_STORE_ROUTE_NAME")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>STORE_ROUTE_NAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STORE_ROUTE_NAME")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Route Name Field</para>
        /// <para>The route name field if the feature class is a point event that doesn't span routes or the from route name field if the feature class is a line event that spans routes. This parameter is required if Store Route Name is checked.</para>
        /// <para>如果要素类是不跨越路径的点事件，则为路径名称字段，如果要素类是跨路径的线事件，则为发源路径名称字段。如果选中了 Store Route Name，则此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _route_name_field { get; set; } = null;


        /// <summary>
        /// <para>To Route Name Field</para>
        /// <para>The to route name field for line events that span routes. This parameter is required if Store Route Name is checked.</para>
        /// <para>跨路由的线事件的 to route name 字段。如果选中了 Store Route Name，则此参数是必需的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _to_route_name_field { get; set; } = null;


        /// <summary>
        /// <para>Output Event Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public CreateLRSEventFromExistingDataset SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}